package com.constructor;

/**
 * Time    : 2023/3/19 15:32
 * Author  : 王摇摆
 * FileName: Father.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class Father {
    private String name;

    public Father() {
        System.out.println("父类无参构造器已执行");
    }

    public Father(String name) {
        this.name = name;
        System.out.println("父类有参构造器已执行");
    }

    public String getName() {
        return name;
    }
}